﻿@model Amazon.Checkout.Settings.CheckoutByAmazonButtonPartSettings

@using System.Web.Mvc;

<fieldset>
@{  
    var selectList = new SelectList(Model.GetPossibleMappings().ToDictionary(key => key, value => value), "Key", "Value", "SelectedValue");
    var possibleMappings = Model.GetPossibleMappings().ToDictionary(key => key, value => value);
} 
    <div>
        @Html.CheckBox("ExpressCheckout", (string.IsNullOrEmpty(Model.ExpressCheckout) || Model.ExpressCheckout == "true"))
        <label class="forcheckbox" for="@Html.FieldIdFor(m => m.ExpressCheckout)">@T("Use Express Checkout")</label>
    </div>

    <label for="@Html.FieldIdFor(m => m.ProductTitleMapping)">@T("Mapping For Product Title")</label>
    @Html.DropDownList("ProductTitleMapping", new SelectList(possibleMappings, "Key", "Value", Model.ProductTitleMapping))
    @Html.ValidationMessageFor(m => m.ProductTitleMapping)

    <label for="@Html.FieldIdFor(m => m.ProductImageUrlMapping)">@T("Mapping For Product Image Url")</label>
    @Html.DropDownList("ProductImageUrlMapping", new SelectList(possibleMappings, "Key", "Value", Model.ProductImageUrlMapping))
    @Html.ValidationMessageFor(m => m.ProductImageUrlMapping)

    <label for="@Html.FieldIdFor(m => m.ProductDescriptionMapping)">@T("Mapping For Product Description")</label>
    @Html.DropDownList("ProductDescriptionMapping", new SelectList(possibleMappings, "Key", "Value", Model.ProductDescriptionMapping))
    @Html.ValidationMessageFor(m => m.ProductDescriptionMapping)

    <label for="@Html.FieldIdFor(m => m.ProductPriceMapping)">@T("Mapping For Product Price")</label>
    @Html.DropDownList("ProductPriceMapping", new SelectList(possibleMappings, "Key", "Value", Model.ProductPriceMapping))
    @Html.ValidationMessageFor(m => m.ProductPriceMapping)

    <label for="@Html.FieldIdFor(m => m.ProductSkuMapping)">@T("Mapping For Product SKU")</label>
    @Html.DropDownList("ProductSkuMapping", new SelectList(possibleMappings, "Key", "Value", Model.ProductSkuMapping))
    @Html.ValidationMessageFor(m => m.ProductSkuMapping)
</fieldset>